let devBase1 = 'http://oapi.secby.cn/';
let devBase = 'http://admin.www.lyuyan.com';
let mock = 'http://yapi.secby.cn/mock/'
let porBase = ""

let isDev = 2; // 1为测试环境，2为生产环境
let base = ''
let employeeeApi = ''
let orgApi = ''
let uploadApi = ''
let ossApi = ''
let dict = ''
if (isDev === 0) {
    employeeeApi = '17'
    orgApi = '33'
    uploadApi = '19'
    ossApi = '43'
    dict = '23'
    base = mock
} else if (isDev === 1) {
    base = devBase
} else if (isDev === 2) {
    base = porBase
} else {
    base = devBase
}

// 请求接口
let url = {
    login: base + '/login/service/login/sys/login',
    logout: base + '/login/service/login/sys/logout',
    getUser: base + 'oasys/' + 'login',

    //登陆成功加载应用
    loadApply: base + '/login/service/login/load/permission/tree',

    // 人事
    employeeInsert: base + employeeeApi + '/personnel/service/employee/insert/dto', // 新增更新人员档案
    employeeFindAllPageByDTO: base + employeeeApi + '/personnel/service/employee/findAllPageByDTO', // 根据DTO分页查询人员档案列表
    updateEmployeeById: base + employeeeApi + '/personnel/service/employee/updateById', // 根据ID更新人员档案
    findEmployeeById: base + employeeeApi + '/personnel/service/employee/', // 根据ID查找人员档案
    delEmployee: base + employeeeApi + '/personnel/service/employee/', // 根据ID删除人员档案

    contractFindAllPageByDTO: base + employeeeApi + '/personnel/service/contract/findAllPageByDTO', // 根据DTO分页查询合同列表
    contractInsert: base + employeeeApi + '/personnel/service/contract/insert/dto', // 根据ID新增合同
    contractUpdateById: base + employeeeApi + '/personnel/service/contract/updateById', // 根据ID更新合同
    contractFindById: base + employeeeApi + '/personnel/service/contract/', // 根据ID查找合同
    contractDelById: base + employeeeApi + '/personnel/service/contract/', // 根据ID删除合同 

    resignationInsert: base + employeeeApi + '/personnel/service/resignationInfo/insert/dto', //新增离职信息
    resignationFindById: base + employeeeApi + '/personnel/service/resignationInfo/', //根据id查询离职信息
    resignationUpdateById: base + employeeeApi + '/personnel/service/resignationInfo/updateById', //根据id更新离职信息
    resignationDelById: base + employeeeApi + '/personnel/service/resignationInfo/', //根据id删除离职信息
    resignationFindAllPageByDTO: base + employeeeApi + '/personnel/service/resignationInfo/findAllPageByDTO', //根据DTO分页查询离职列表

    correntInsert: base + employeeeApi + '/personnel/service/correctInfo/insert/dto', //新增信息
    correntFindById: base + employeeeApi + '/personnel/service/correctInfo/', //根据id查询信息
    correntUpdateById: base + employeeeApi + '/personnel/service/correctInfo/updateById', //根据id更新信息
    correntDelById: base + employeeeApi + '/personnel/service/correctInfo/', //根据id删除信息
    correntFindAllPageByDTO: base + employeeeApi + '/personnel/service/correctInfo/findAllPageByDTO', //根据DTO分页查询列表

    transferInsert: base + employeeeApi + '/personnel/service/manShufflingInfo/insert/dto', //新增信息
    transferFindById: base + employeeeApi + '/personnel/service/manShufflingInfo/', //根据id查询信息
    transferUpdateById: base + employeeeApi + '/personnel/service/manShufflingInfo/updateById', //根据id更新信息
    transferDelById: base + employeeeApi + '/personnel/service/manShufflingInfo/', //根据id删除信息
    transferFindAllPageByDTO: base + employeeeApi + '/personnel/service/manShufflingInfo/findAllPageByDTO', //根据DTO分页查询列表

    welfareInsert: base + employeeeApi + '/personnel/service/welfareInfo/insert/dto', //新增信息
    welfareFindById: base + employeeeApi + '/personnel/service/welfareInfo/', //根据id查询信息
    welfareUpdateById: base + employeeeApi + '/personnel/service/welfareInfo/updateById', //根据id更新信息
    welfareDelById: base + employeeeApi + '/personnel/service/welfareInfo/', //根据id删除信息
    welfareFindAllPageByDTO: base + employeeeApi + '/personnel/service/welfareInfo/findAllPageByDTO', //根据DTO分页查询列表

    credentialsInsert: base + employeeeApi + '/personnel/service/credentialsInfo/insert/dto', //新增信息
    credentialsFindById: base + employeeeApi + '/personnel/service/credentialsInfo/', //根据id查询信息
    credentialsUpdateById: base + employeeeApi + '/personnel/service/credentialsInfo/updateById', //根据id更新信息
    credentialsDelById: base + employeeeApi + '/personnel/service/credentialsInfo/', //根据id删除信息
    credentialsFindAllPageByDTO: base + employeeeApi + '/personnel/service/credentialsInfo/findAllPageByDTO', //根据DTO分页查询列表

    assessmentTemplateInsert: base + employeeeApi + '/personnel/service/assessmentTemplateInfo/insert/dto', //新增信息
    assessmentTemplateFindById: base + employeeeApi + '/personnel/service/assessmentTemplateInfo/', //根据id查询信息
    assessmentTemplateUpdateById: base + employeeeApi + '/personnel/service/assessmentTemplateInfo/updateById', //根据id更新信息
    assessmentTemplateDelById: base + employeeeApi + '/personnel/service/assessmentTemplateInfo/', //根据id删除信息
    assessmentTemplateBytemplateTypeId: base + employeeeApi + '/personnel/service/assessmentTemplateInfo/templateTypeId', //根据id删除信息
    assessmentTemplateFindAllPageByDTO: base + employeeeApi + '/personnel/service/assessmentTemplateInfo/findAllPageByDTO', //根据DTO分页查询列表

    assessmentKaoheInsert: base + employeeeApi + '/personnel/service/assessmentKaoheInfo/insert/dto', //新增信息
    assessmentKaoheFindById: base + employeeeApi + '/personnel/service/assessmentKaoheInfo/', //根据id查询信息
    assessmentKaoheUpdateById: base + employeeeApi + '/personnel/service/assessmentKaoheInfo/updateById', //根据id更新信息
    assessmentKaoheDelById: base + employeeeApi + '/personnel/service/assessmentKaoheInfo/', //根据id删除信息
    assessmentKaoheFindAllPageByDTO: base + employeeeApi + '/personnel/service/assessmentKaoheInfo/findAllPageByDTO', //根据DTO分页查询列表



    //组织机构-组织机构
    organizationList: base + orgApi + '/org/service/organization/list', //  查询所有机构,递归查询子机构,包含岗位,账号信息 (树状)
    organizationUserList: base + orgApi + '/org/service/organization/user/list', //  当前用户对应域名下所有组织机构列表
    organizationUserListByOrgId: base + orgApi + '/org/service/job/list/', //  根据组织机构id,查询当前机构下的岗位(不包含子机构的岗位)
    organizationInsert: base + orgApi + '/org/service/organization/insert/dto', //  新增
    organizationDelById: base + orgApi + '/org/service/organization/delete/', //  删除
    organizationUpdateById: base + orgApi + '/org/service/organization/updateById', //  更新

    //岗位
    jobInfoInsert: base + '/org/service/job/insert/dto', // 新增 客户信息(包含自定义字段数据)
    jobInfoFindAllPageByDTO: base + '/org/service/job/findAllPageByDTO', // 根据DTO分页查询客户信息(列表不包含自定义字段)
    jobInfoUpdateById: base + '/org/service/job/updateById', // 根据Id更新-包含定义字段
    jobInfoFindById: base + '/org/service/job/', // 根据ID获取客户信息-包含定义字段
    jobInfoDel: base + '/org/service/job/', // 删除客户信息

    //角色权限
    roleInsert: base + '/org/service/role/insert/dto', // 新增 客户信息(包含自定义字段数据)
    roleFindAllPageByDTO: base + '/org/service/role/list', // 根据DTO分页查询客户信息(列表不包含自定义字段)
    roleUpdateById: base + '/org/service/role/updateById', // 根据Id更新-包含定义字段
    roleFindById: base + '/org/service/role/', // 根据ID获取客户信息-包含定义字段
    roleDel: base + '/org/service/role/', // 删除客户信息

    permissionFind: base + '/org/service/permission/roleModules', // 新增 
    permissionFindModules: base + '/org/service/permission/modulesPermissions', // 新增 
    updatePermissionsByModuleId: base + '/org/service/permission/updatePermissionsByModuleId', // 新增 

    //用户账号
    accountFindPageList: base + '/org/service/account/page/list',
    accountFindAll: base + '/org/service/account/list/all',
    accountInsert: base + '/org/service/account/insert/dto',
    accountUpdateById: base + '/org/service/account/updateById',
    accountFindById: base + '/org/service/account/',
    accountModify: base + '/org/service/account/password/admin/modify/',


    // 客户资料
    clientInfoInsert: base + '/custom/service/clientInfo/insert/dto', // 新增 客户信息(包含自定义字段数据)
    clientInfoFindAllPageByDTO: base + '/custom/service/clientInfo/findAllPageByDTO', // 根据DTO分页查询客户信息(列表不包含自定义字段)
    clientInfoFindAllNo: base + '/custom/service/clientInfo/findAllNo', // 查询未分配的用户
    clientInfoUpdateById: base + '/custom/service/clientInfo/updateById', // 根据Id更新-包含定义字段
    clientInfoFindById: base + '/custom/service/clientInfo/', // 根据ID获取客户信息-包含定义字段
    clientInfoDel: base + '/custom/service/clientInfo/', // 删除客户信息

    customFieldGetAllField: base + '/custom/service/customField/getAllField', // 自定义客户属性列表
    customFieldInsert: base + '/custom/service/customField/insert/dto', // 新增客户信息扩展字段名
    customFieldUpdateById: base + '/custom/service/customField/updateById', // 根据ID更新扩展字段
    customFieldFindById: base + '/custom/service/customField/', // 根据ID获取拓展字段详情
    customFieldDel: base + '/custom/service/customField/', // 删除客户信息拓展的字段

    regionInfoFindAllPageByName: base + '/custom/service/regionInfo/findAllPageByName', // 根据名字分页查询区域

    customerAllocationInfoFindAllPageByDTO: base + '/custom/service/customerAllocationInfo/findAllPageByDTO', // 根据DTO分页查询所有分配客户列表
    customerAllocationInfoInsert: base + '/custom/service/customerAllocationInfo/insert/dto', // 新增分配客户
    customerAllocationInfoUpdateById: base + '/custom/service/customerAllocationInfo/updateById', // 更新分配客户
    customerAllocationInfoFindById: base + '/custom/service/customerAllocationInfo/', // 根据ID查找分配客户
    customerAllocationInfoDel: base + '/custom/service/customerAllocationInfo/', //  根据ID删除分配客户

    customerLinkInfoFindAllPageByDTO: base + '/custom/service/customerLinkInfo/findAllPageByDTO', // 根据DTO分页查询所有客户联系记录列表
    customerLinkInfoInset: base + '/custom/service/customerLinkInfo/insert/dto', // 新增联系记录
    customerLinkInfoUpdateById: base + '/custom/service/customerLinkInfo/updateById', // 根据ID更新联系记录
    customerLinkInfoFindById: base + '/custom/service/customerLinkInfo/', // 根据ID查找联系记录
    customerLinkInfoDel: base + '/custom/service/customerLinkInfo/', // 根据ID删除联系记录

    giftInfoFindAllPageByDTO: base + '/custom/service/giftInfo/findAllPageByDTO', // 根据DTO分页查询所有礼品关怀列表
    giftInfoInsert: base + '/custom/service/giftInfo/insert/dto', // 新增礼品关怀
    giftInfoUpdateById: base + '/custom/service/giftInfo/updateById', // 更新礼品关怀 
    giftInfoFindById: base + '/custom/service/giftInfo/', // 根据ID查找礼品关怀
    giftInfoDel: base + '/custom/service/giftInfo/', // 删除礼品关怀

    clientContractInfoFindAllPageByDTO: base + '/custom/service/clientContractInfo/findAllPageByDTO', // 根据DTO分页查询合同记录列表
    clientContractInfoInsert: base + '/custom/service/clientContractInfo/insert/dto', // 新增客户合同
    clientContractInfoUpdateById: base + '/custom/service/clientContractInfo/updateById', // 更新客户合同
    clientContractInfoFindById: base + '/custom/service/clientContractInfo/', // 根据ID查找客户合同
    clientContractInfoDel: base + '/custom/service/clientContractInfo/', // 根据ID删除客户合同

    collectMoneyPlanFindAllPageByDTO: base + '/custom/service/collectMoneyPlan/findAllPageByDTO', // 根据DTO分页查询收款计划记录
    collectMoneyPlanInsert: base + '/custom/service/collectMoneyPlan/insert/dto', // 新增收款计划
    collectMoneyPlanUpdateById: base + '/custom/service/collectMoneyPlan/updateById', // 根据ID更新收款计划
    collectMoneyPlanFindById: base + '/custom/service/collectMoneyPlan/', // 根据ID查找收款计划
    collectMoneyPlanDel: base + '/custom/service/collectMoneyPlan/', // 根据ID删除收款计划

    billingInfoFindAllPageByDTO: base + '/custom/service/billingInfo/findAllPageByDTO', // 根据DTO分页查询所有开票记录列表
    billingInfoInsert: base + '/custom/service/billingInfo/insert/dto', // 开票申请
    billingInfoUpdateById: base + '/custom/service/billingInfo/updateById', // 更新发票信息
    billingInfoFindById: base + '/custom/service/billingInfo/', // 根据ID查找发票信息
    billingInfoDel: base + '/custom/service/billingInfo/', // 根据ID删除发票信息

    regionInfoFindAllPageByName: base + '/custom/service/regionInfo/findAllPageByName', // 可以根据名字分页查询区域
    regionInfoInsert: base + '/custom/service/regionInfo/insert/dto', // 新增区域
    regionInfoUpdateById: base + '/custom/service/regionInfo/updateById', // 根据Id更新区域
    regionInfoDel: base + '/custom/service/regionInfo/', // 根据ID删除区域

    clientTypeTypeTree: base + '/custom/service/clientType/typeTree', // 往来单位类别-获取分类树
    clientTypeInsert: base + '/custom/service/clientType/insert/dto', // 新增往来单位类别
    clientTypeUpdateById: base + '/custom/service/clientType/updateById', // 根据ID更新往来单位类别
    clientTypeFindById: base + '/custom/service/clientType/', // 根据ID查找往来单位类别
    clientTypeDel: base + '/custom/service/clientType/', //  根据ID删除往来单位类别


    // 上传
    uploadFile: base + ossApi + '/oss/service/oss/upload', // 上传图片（返回文件访问路径）
    uploadFiles: base + ossApi + '/oss/service/oss/upload/return/result', // 上传文件（uploadFile）

    //文件
    //文件-附件管理
    uploadFileInfoFindById: base + uploadApi + '/file/service/uploadFileInfo/', //获取关联ID对应的附件

    //字典管理（基础资料）
    dictItemDictTypeId: base + '/basic/service/dictItem/dictTypeId', // 根据字典类型ID,获取字典项列表
    dictItem: base + '/basic/service/dictItem/typeName', // 字典数据查找
    dictItemInsert: base + '/basic/service/dictItem/insert/dto', // 字典项新增 
    dictItemUpdateItemName: base + '/basic/service/dictItem/updateItemName', // 字典项更新 
    dictItemDel: base + '/basic/service/dictItem/', // 字典项删除

    dictTypeFindAllPageByTypeName: base + '/basic/service/dictType/findAllPageByTypeName', // 获取分类列表,不传名字查全部
    dictTypeInsert: base + '/basic/service/dictType/insert/dto', // 新增字典分类
    dictTypeUpdateById: base + '/basic/service/dictType/updateById', // 新增字典分类
    dictTypeDeleById: base + '/basic/service/dictType', // 删除字典分类

    // 秒用系统基础数据
    provinceFindAll: base + '/system/service/province/findAll', // 通用-查询所有省份
    cityFindAll: base + '/system/service/city/findAll', // 通用-查询所有市
    cityFindList: base + '/system/service/city/findList', // 根据条件查询所有城市
    areaFindAll: base + '/system/service/area/findAll', // 通用-查询所有区
    areaFindList: base + '/system/service/area/findList', // 根据条件查询所有区

    //财务
    //科目分类
    subjectCategoryFindAll: base + '/finance/service/subjectCategory/all', //获取科目分类列表
    subjectCategoryFindById: base + '/finance/service/subjectCategory/', //获取科目分类
    //科目管理
    subjectGetAllTypeTree: base + '/finance/service/accSubject/getAllTypeTree', // 获取所有科目属性的科目列表(树状图)
    subjectGetTreeByType: base + '/finance/service/accSubject/getTreeByType/', // 根据科目属性获取科目列表(树状图)
    subjectInsert: base + '/finance/service/accSubject/addAccSubject', // 新增科目
    subjectUpdateById: base + '/finance/service/accSubject/updateAccSubject', // 更新科目,只能更新名字
    subjectDelById: base + '/finance/service/accSubject/deleteAccSubject/', // 删除科目
    subjectFindById: base + '/finance/service/accSubject/', // 查询科目

    //汇率
    currRateInsert: base + '/finance/service/currRate/addCurrRate',
    currRateFindAllPage: base + '/finance/service/currRate/page/list',
    currRateUpdateById: base + '/finance/service/currRate/updateById',
    currRateDelById: base + '/finance/service/currRate/',
    currRateFindById: base + '/finance/service/currRate/',
    currRateFindList: base + '/finance/service/currRate/setBooks/list',
    getByCurrCodeAndDate: base + '/finance/service/currRate/getByCurrCodeAndDate',
    countLamount: base + '/finance/service/currRate/countLamount',

    //币别
    currencyInsert: base + '/finance/service/currency/insert/dto', // 新增
    currencyUpdateById: base + '/finance/service/currency/updateById', // 更新
    currencyDelById: base + '/finance/service/currency/delete/', // 删除
    currencyFindById: base + '/finance/service/currency/', // 查询
    currencyFindAllPage: base + '/finance/service/currency/page/list',

    //会计期间
    accPeriodFindDefaultData: base + '/finance/service/accPeriod/getEnums',
    accPeriodFindAllPage: base + '/finance/service/accPeriod/page/list',
    accPeriodDel: base + '/finance/service/accPeriod/deleteAccPeriod/',
    accPeriodGenerate: base + '/finance/service/accPeriod/generate/',
    accPeriodGetEnums: base + '/finance/service/accPeriod/getEnums',
    accPeriodDefaultData: base + '/finance/service/accPeriod/defaultData/', // 根据日期计算出对应的会计期间

    //单别设置
    orderNoRuleInsert: base + '/finance/service/orderNoRule/addrule',
    orderNoRuleFindAllPage: base + '/finance/service/orderNoRule/page/list',
    orderNoRuleUpdateById: base + '/finance/service/orderNoRule/updateById',
    orderNoRuleFindModelOfNo: base + '/finance/service/orderNoRule/getModelOfNo',
    orderNoRuleFindTask: base + '/finance/service/orderNoRule/getTaskOfNo',
    orderNoRuleFindAll: base + '/finance/service/orderNoRule/all/list',
    orderNoRuleFindById: base + '/finance/service/orderNoRule/',

    //银行账户
    accBankInsert: base + '/finance/service/accBank/addAccBank',
    accBankFindAllPage: base + '/finance/service/accBank/findAllPageByDTO',
    accBankUpdateById: base + '/finance/service/accBank/updateAccBank',
    accBankDelById: base + '/finance/service/accBank/',
    accBankFindById: base + '/finance/service/accBank/',

    // 凭证管理
    bkpfInfoList: base + '/finance/service/bkpfInfo/master/page/list', // 根据条件分页查询凭证单头列表
    bkpfInfoAddBkpfInfo: base + '/finance/service/bkpfInfo/addBkpfInfo', // 新增凭证返回凭证号
    bkpfInfoCancel: base + '/finance/service/bkpfInfo/cancel/review/', // 反审核凭证
    bkpfInfoFindById: base + '/finance/service/bkpfInfo/info/', // 根据单头ID查询单头和单身
    bkpfInfoReview: base + '/finance/service/bkpfInfo/review/', // 审核凭证
    bkpfInfoUpdateBkpfInfo: base + '/finance/service/bkpfInfo/updateBkpfInfo', // 更新凭证
    bkpfInfoDel: base + '/finance/service/bkpfInfo/', //删除凭证
    bkpfInfoPosting: base + '/finance/service/bkpfInfo/posting/', // 凭证过账
    bkpfInfoUnposting: base + '/finance/service/bkpfInfo/unposting/', // 凭证反过账

    // 总帐处理
    generalLedgerInfo: base + '/finance/service/generalLedger/info/', // 根据总账科目id查询明细
    generalLedgerList: base + '/finance/service/generalLedger/master/list', // 根据条件分页查询总账科目列表


    //账套
    setBooksInsert: base + '/finance/service/setBooks/addSetBook',
    setBooksFindAllPage: base + '/finance/service/setBooks/page/list',
    setBooksUpdateById: base + '/finance/service/setBooks/updateSetBooks',
    setBooksDelById: base + '/finance/service/setBooks/deleteSetBooks/',
    setBooksFindById: base + '/finance/service/setBooks/',
    setBooksFindAll: base + '/finance/service/setBooks/all/list',

    //银行往来
    billBankDetailInsert: base + '/finance/service/billBankDetail/addBillBankDetail',
    billBankDetailFindAllPage: base + '/finance/service/billBankDetail/master/page/list', //根据条件分页查询单头
    billBankDetailUpdateById: base + '/finance/service/billBankDetail/updateBillBankDetail',
    billBankDetailDelById: base + '/finance/service/billBankDetail/deleteBillBankDetail/',
    billBankDetailFindById: base + '/finance/service/billBankDetail/info/',
    billBankbkpf: base + '/finance/service/billBankDetail/push/bkpf/',
}



export default {
    isDev: isDev,
    url: url
};